1. Field of the Invention
The present invention relates to an image processing apparatus and a method of image processing, which generates a code stream by encoding image data.
2. Description of the Background Art
Recently, a system has been proposed in which image data is divided into at least one rectangular area, and the at least one rectangular area is compressed independently. These rectangular areas are processed according to the following processes: color conversion processing, resolution conversion processing, regional division processing, and bit-plane division processing. Arithmetic coding processing involves processing the data that is generated by the above processing (color conversion processing, resolution conversion processing, regional division, and bit-plane division). As a result, code data is generated by the arithmetic coding processing, and the code stream is generated by rearranging the code data.
The order of rearranging the code data is known as a progressive order. There are five kinds of progressive order. One of the progressive orders is selected and code data is rearranged based on the selected progressive order. If a user wants to display a low resolution image on a display device, the image data is encoded using the RPCL progressive order, and it is possible to display of the order of the resolution.
For example, Japanese Patent Laid-open No. 2005-12685 records information transferred to the client device in past times as historical information. When the client device receives a request command and requests a packet data in the rectangular area, a kind of progressive order is determined based on the historical information. An order of the packet data that is transferred to the client device is decided corresponding to the result of the determination. Further, the packet data in the rectangular area is transferred to the client device based on the order of the packet.
However, it is necessary to process code data of all rectangular areas at the same time, in order of a resolution array of the code data of all rectangular areas, if the code data is generated in order of the resolution. A large amount of processing time and memory used by the code data are needed by this processing. As a result, there is a problem of the increase in processing time and an instability of movement of the equipment. In addition, when the code data is generated by hardware, the cost is high for similar reasons.